#include "String2Num.h"


void String2Num::operator<<(char c)
{
    if(isDot(c) && !withDot)
    {
        withDot = true;
        return;
    }
    if(isNumChar(c) && !withDot)
    {
        integerPart.push(c);
        return;
    }
    if(isNumChar(c) && withDot)
    {
        decimalPart.push(c);
        return;
    }
    if(isDot(c) && withDot)
    {
        pLib::console::WarnInfo("检测到两个小数点.");
        error = true;
        return;
    }
    pLib::console::WarnInfo("无法识别的字符.");
    error = true;
}
